{extend name="main"}
    {block name="button"}
    <button data-target-submit class='layui-btn layui-btn-sm'>保存数据</button>
    <button data-target-backup class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确认要取消编辑吗？">取消编辑</button>
    {/block}
{block name="content"}
    <form class="layui-form layui-card" data-table-id="MenuTable" action="{:sysuri()}" data-auto="true" method="post">

        <div class="layui-card-body">

            <label class="layui-form-item block relative">
                <span class="help-label"><b>名称</b>Name</span>
                <input class="layui-input" name="name" placeholder="请输入订阅名称" vali-name="名称" required value="{$vo.name|default=''}">
            </label>

            <label class="layui-form-item block relative">
                <span class="help-label"><b>标签</b>Tag</span>
                <input class="layui-input" name="tag" placeholder="请输入标签" vali-name="标签" required value="{$vo.tag|default=''}">
            </label>

            <label class="layui-form-item block relative">
                <span class="help-label"><b>价格</b>Price</span>
                <input class="layui-input" name="price" placeholder="请输入价格" vali-name="价格" required value="{$vo.price|default=''}">
            </label>

            <label class="layui-form-item block relative">
                <span class="help-label"><b>简介</b>introduction</span>
                <textarea name="introduction" class="layui-input">{$vo.introduction|default=''}</textarea>
            </label>

            
            <div class="layui-form-item">
                <span class="help-label"><b>详情</b>Content</span>
                <textarea class="layui-hide" style="height: 250px;" name="detail">{$vo.detail|default=""}</textarea>
            </div>


            <div class="layui-form-item text-center">
                <button class="layui-btn" type='submit'>保存数据</button>
                <button class="layui-btn layui-btn-danger" type="button" data-target-backup>取消编辑</button>
            </div>
        </div>

        <div class="hr-line-dashed"></div>
        {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

       
    </form>
{/block}

{block name='script'}
<script>
       require(['ckeditor'], function () {
            window.createEditor('[name=detail]', {height: 450,width:450});
        });
</script>
{/block}
